﻿using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;

namespace _01_基础知识_类型转换_
{
    class Program
    {
        static void Main(string[] args)
        {
            //int a = 10;
            //double b = a;//10 -> 10.0

            //double c = 34.34;

            //a = (int)c;
            //Console.WriteLine(a);
            //自动类型转换，只关注类型的大小，不关心变量值的大小
            //Father f = new Son();

            //Son s = f as Son;//如果能转换成功则转换，否则返回null
            //s.SonMethod();

            Father f = new Father();

            //Son s = f as Son;
            //Console.WriteLine(s == null);
            Son s = f as Son;
            List<int> l;
        }
    }
    class Father
    {

    }
    class Son : Father
    {
        public void SonMethod()
        {

        }
    }
}

